home *** CD-ROM | disk | FTP | other *** search
- ------------------------------------------
- ASCII to POSTSCRIPT Translator Release 0.6
- by Johannes Geenen
- ------------------------------------------
-
- This is release 0.6 of my ASCII to Postscript translator driver
- PSDRIVER. It is a true DOS device driver that redirects output from a
- DOS printing device (LPTx) to a BIOS printer port and translates input
- into Postscript statements. PSDRIVER support a big subset of the IBM PC
- character set including national character sets and most IBM graphic
- characters. It support a subset of the EPSON FX printer code sequences,
- too.
-
- PSDRIVER has a DOS command line interface to review installation status
- and change default behavior of PSDRIVER's output. This command line
- interface is bound together with the device driver to an .EXE file.
-
- PSDRIVER was developed with Borland's TASM and C++ under DOS 6.2
- environment and tested under DOS 5.0, 6.0 and 6.2, Novell DOS 7.0 and
- the DOS shell of OS/2 2.1.
-
- It allows output on network printers (tested with our BANYAN VINES 4.11
- and 5.53 LAN) and may be used under WINDOWS for output through the
- LPTx.DOS devices. I am using Mannesmann Tally MT906PS for testing, but
- PSDRIVER uses no printer specific Postscript extensions and should work
- on any Postscript printer.
-
- PSDRIVER occupies less than 9k in memory.
-
-
- Installation
- ------------
-
- Although PSDRIVER is named PSDRIVER.EXE, it is a true DOS device driver
- and has to be installed during boot procedure from the CONFIG.SYS file.
- To install PSDRIVER, simply add a line to your CONFIG.SYS file:
-
- DEVICE = <Your_Drive_And_Path>\PSDRIVER.EXE
-
- where "<Your_Drive_And_Path>" is the location of PSDRIVER.EXE, i.e.
-
- DEVICE = C:\UTIL\STARTUP\PSDRIVER.EXE
-
- PSDRIVER may be loaded high using the DEVICEHIGH statement instead of
- DEVICE.
-
- On default, PSDRIVER hooks onto the LPT3 device and redirects output
- after translation to the first BIOS printer port. PSDRIVER assumes an A4
- page size (297*210mm) and will print in portrait orientation. Several
- command line options may be used during installation to change this
- default behavior:
-
- /D<device-name> The default LPT3 may be changed using the /D
- switch to a different device. The device name
- is allowed to have at maximum 8 characters
- that will be converted to upper case letters.
-
- /P<printer-port> Specify the desired printer port (1, 2, or 3
- are valid printer port IDs) for the trans-
- lated output.
-
- /S<page-size> Specify one of the following digits:
- 1 - Letter size
- 2 - Legal size
- 3 - A4 size (default)
-
- /O<page-orient> Specify
- 1 for portrait orientation
- 2 for landscape orientation
-
- /L<left-margin> Specify left margin in characters;
- current character density will be used
-
- /M<code> Specify Multiplex interrupt 2Fh code that
- will be used by PSDRIVER command line
- (default EFh). Use a two character hex value.
- (See troubleshooting)
-
- For example, if you are using letter size paper with your Postscript
- printer, the printer is attached to the third printer port (or a network
- redirector hooks redirects output to the second printer port to a
- network printer), and you want to use LPT2 for ASCII output on your
- Postscript printer, insert the following DEVICE statement into your
- CONFIG.SYS file:
-
- DEVICE=PSDRIVER.EXE /DLPT2 /P3 /S1
-
- Option switches may be either in small or captial letters. Do not insert
- spaces between switch and value.
-
-
- Usage
- -----
-
- PSDRIVER does not change the behavior of the original printer port
- (unless you map PSDRIVER onto the same device and printer port). Print
- your Postscript files to the original port, and your ASCII files to the
- re- directed port. PSDRIVER will do the rest:
-
- - On the device open call it sends the internal Postscript header
- to the printer.
-
- - It captures each character, converts it to the equivalent character
- of the postscript character set or issues Postscript procedure
- calls to the printer.
-
- - On the device close call it performs a last showpage to eject the
- last page and terminates the Postscript job.
-
- When calling PSDRIVER from DOS command line, it will report the
- installation status of PSDRIVER.
-
- You may use command line switches to change the default behavior of
- PSDRIVER for subsequent outputs. Try PSDRIVER /V for complete
- installation info or use one (ore more) of the following switches (do
- not add spaces between switch and parameter):
-
- /P<printer-port> Specify the desired printer port (1, 2, or 3
- are valid printer port IDs) for the trans-
- lated output.
-
- /S<page-size> Specify one of the following digits:
- 1 - Letter size
- 2 - Legal size
- 3 - A4 size (default)
-
- /O<page-orient> Specify
- 1 for portrait orientation
- 2 for landscape orientation
-
- /L<left-margin> Specify left margin in characters;
- current character density will be used
-
- /M<code> Specify Multiplex interrupt 2Fh code that
- will be used by PSDRIVER command line to
- retrieve data from installed PSDRIVER
- (default EFh). Use a two character hex value.
- Specify a value of ? to allow the PSDRIVER
- command line to search MUX codes between
- DBh and FFh. (See troubleshooting)
-
-
- Supported Printer Control Codes
- -------------------------------
-
- PSDRIVER supports a basic subset of the EPSON FX printer control code set.
- This allows you to change font sizes and styles, line density, page length,
- etc. This is a complete list of ESCAPE sequences and control characters
- supported by PSDRIVER:
-
- BS 08h Backspace (go back one character cell)
- HT 09h Tab (fixed tabstops every 8th character cell)
- LF 0ah Line Feed (advance to next line)
- FF 0ch Form Feed (eject page)
- CR 0dh Carriage Return (go back to start of line)
- SI 0fh Set compressed character pitch (17cpi)
- DC2 12h Reset compressed character pitch
-
- ESC SI Set compressed character pitch (17cpi)
- ESC 0 Set line density: 8 lpi
- ESC 2 Set line density: 6 lpi
- ESC 4 Set italic font style
- ESC 5 Reset italic font style
- ESC E Set bold font style
- ESC F Reset bold font style
- ESC M Set Elite character pitch (12cpi)
- ESC P Set Pica character pitch (10cpi)
- ESC T Set Super-/Subscript off
-
- ESC - <0> Set Underline off
- ESC - <1> Set Underline on
- ESC S <0> Set subscript on
- ESC S <1> Set superscript on
-
- ESC 3 <v> Set line density to <v>/180 inch
- ESC A <v> Set line density to <v>/60 inch
- ESC C <v> Set page length to <v> lines of current line density
- ESC l <v> Set left margin in current character density
-
-
- Troubleshooting
- ---------------
-
- Some users reported problems with the command line interface of
- PSDRIVER: Calling PSDRIVER /v from DOS displays just garbage, not the
- true driver state. I think, interferences between PSDRIVER and other
- installed programs (i.e. the Netware shell or drivers) caused this
- problems. With version 0.6, I enhanced the communication interface to
- PSDRIVER.
-
- If your PSDRIVER installation continues to malfunction under DOS,
- WINDOWS or OS/2 DOS-box please try out the following hints:
-
- * PSDRIVER is installed during CONFIG.SYS (you see the installation
- message) but the DOS command PSDRIVER /v reports that PSDRIVER isn't
- installed.
-
- May be, another resident program uses the same MUX-function as
- PSDRIVER. On default, PSDRIVER answers on an interrupt call to the
- multiplex interrupt 0x2f:
-
- mov ah, 0efh
- xor al, al
- int 02fh
-
- with the return values 'G' in register AH and 'N' in register AL. The
- other resident program seems to intercept the EFh code, too and
- responds in a different way.
-
- Modify PSDRIVER's MUX-code using the /M command line option. Specify
- a different code as a two character hex value. Codes between 00 and
- DA should be avoided because they are reserved by DOS.
-
- The command line version of PSDRIVER tries the EF code first. If you
- have specified a different code on CONFIG.SYS command line, you have
- to specify the same value on PSDRIVER's DOS interface, too. You may
- use the query function of PSDRIVER's interface (specify /M?) to allow
- PSDRIVEr to check all codes above DAh.
-
- * PSDRIVER reports garbage after issuing the PSDRIVER /v command.
-
- It seems that a program uses the same technique as PSDRIVER for
- communication. (It uses the EF00 code and returns 'GN'). In this
- case try a different MUX code on installation and command line
- interface.
-
-
-
-
- History
- -------
-
- 0.1 (Sep 09, 1993) First release; bug free but with limited
- character set and without control code support
-
- 0.2 (Oct 20, 1993) Removed code overhead, added control code support
-
- 0.3 (Jan 16, 1994) Reduced font size to allow printing of 80
- characters on one line, enhanced subset of
- recognized characters; first version with
- .EXE layout
-
- 0.4 (Feb 20, 1994) Modified device driver interface, support of
- different page sizes and orientations; first
- implementation of DOS command line interface.
-
- 0.5 (Apr 20, 1994) Fixed bug: No longer resetting line density
- on start of a new page
- Fixed bug: Evaluation of multiple command
- line arguments
- Fixed bug: ESC-E starts bold printing and
- ESC-F stops it (thanks to Edward Skvorc).
- Added Feature: /L (set left margin)
-
- 0.6 (Jun 05, 1994) Modified communication interface between
- installed PSDRIVER and command line interface
- Added switch: /M (set MUX code);
- Added left margin escape code
-
-
- Known Problems
- --------------
-
- The last page of output is ejected only, if the application closes the
- printer port on termination of the print job. If the application doesn't
- close the print device, the last page is lost forever... A programmable
- timer for PSDRIVER will fix this problem. The next release of PSDRIVER
- will have this feature.
-
-
-
- Future Enhancements
- -------------------
-
- The next release will add a user programmable interface to PSDRIVER.
- A windowed configuration and installation program for PSDRIVER is under
- development.
-
-
-
- The Author
- ----------
-
- I'm network administrator of a Banyan Vines WAN in a german mobile phone
- company (Mannesmann Mobilfunk). I developed PSDRIVER to meet my personal
- requirements: printing source codes, E-Mail and ASCII reports. PSDRIVER
- is my first assembler program (and my first device driver implementation,
- too).
-
- Please feel free to contact me if you have questions, bug reports or
- suggestions.
-
- Send mail to
-
- Johannes Geenen
- Schwannstr. 21
- D-41460 Neuss
- Germany
-
- or contact me on Compuserve (ID 100137,3124).
-
-
-
-